import { createStore } from 'vuex'
import createPersistedstate from 'vuex-persistedstate'
import getters from './getters.js'
import modules from './modules/index.js'
const store = createStore({
  modules: modules,
  getters,
  plugins: [
    createPersistedstate(
      {
        key: 'activeItem',
        paths: ['category.activeItem'],
        storage: window.sessionStorage
      }
    )
    // createPersistedstate(
    //   { key: 'test', paths: ['user.profile'] }
    // )
  ]
})

export default store
